import Vue from 'vue'
import Router from 'vue-router'
//导航页
import Tabbar from '../views/tabbar/index'
//首页
import Index from '../views/index/index'

//发布
import Send from '../views/send/index'
import Job from '../views/send/job'
import Recruit from '../views/send/recruit'
import Transfer from '../views/send/transfer'
import Buy from '../views/send/buy'
import Equipment from '../views/send/equipment'
import Service from '../views/send/service'
//新闻
import News from '../views/news/index'
//用户
import User from '../views/user/index'

//详情页
import Detail from '../views/detail/index'

Vue.use(Router)

export default new Router({
  routes: [{
    path: '/',
    name: 'index',
    component: Tabbar,
    children: [
      {
        path: '',
        components: {
          default: Index,
          user: User,
          send: Send,
          news: News
        }
      }
    ]
  }, {
    path: '/detail',
    name: 'detail',
    component: Detail
  }, {
    path: '/job',
    name: 'job',
    component: Job
  }, {
    path: '/recruit',
    name: 'recruit',
    component: Recruit
  }, {
    path: '/transfer',
    name: 'transfer',
    component: Transfer
  }, {
    path: '/buy',
    name: 'buy',
    component: Buy
  }, {
    path: '/equipment',
    name: 'equipment',
    component: Equipment
  }, {
    path: '/service',
    name: 'service',
    component: Service
  }
  ]
})
